/**
 *
 */
package cc.aileron.dao.utils;

import cc.aileron.dao.G2DaoPaging;

/**
 * G2DaoPaging 生成用ファクトリ
 * 
 * @author aileron
 */
public class G2DaoPagingUtils
{
    /**
     * @param limit
     * @param offset
     * @return {@link G2DaoPaging}
     */
    public static G2DaoPaging paging(final int limit, final int offset)
    {
        return new G2DaoPaging()
        {
            @Override
            public int count()
            {
                return count;
            }

            @Override
            public void count(final int count)
            {
                this.count = count;
            }

            @Override
            public int limit()
            {
                return limit;
            }

            @Override
            public int offset()
            {
                return offset;
            }

            private int count;
        };
    }
}